package com.zhaol.oa.controller;


import com.zhaol.oa.entity.House;
import com.zhaol.oa.mapper.HouseMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@CrossOrigin
@RestController
public class HouseController {
    @Autowired
    private HouseMapper houseMapper;
    @RequestMapping("/selectHouse")
    private List<House> selectHouse(House house){
        List<House> houses = houseMapper.selectHouse(house);
        return houses;
    }
    @RequestMapping("/getHouseCount")
    public int getHouseCount(House house) { return houseMapper.getCount(house); }
}
